				#####################################
				# REPLICATION MATERIAL for: 
				# Di Leo, R., Dinas, E., and Meiske, B. (2025), "Berlinguer I Love You (Still): the Downstream Effects of Expressive Voting
				#####################################


/*
*** Note: replicators should add to the local ado folder (identify it using the command "sysdir"): 

ado files to include in the Stata "ado" directory: 	"DCdensity.ado" "rddisttestk.ado"  	
(typically following a path "ado/plus/initial of the package", use command "sysdir" to identify it. Note that Stata must be restarted to incorporate the files change)	


	a. "DCdensity.ado" used to compute the density test (also available here: https://eml.berkeley.edu/~jmccrary/DCdensity/) 
		Developed by Justin McCrary. 
		See: McCrary, Justin. "Manipulation of the running variable in the regression discontinuity design: A density test." Journal of econometrics 142.2 (2008): 698-714.

	b. "rddisttestk.ado" used to compute the density test (also available here: https://economics.byu.edu/frandsen/Pages/Software.aspx) 
		Developed by Brigham R. Fradsen.
*/



/*
*** Note: replicators must install the following packages (by uncommenting this section)

net install rdrobust, from(https://raw.githubusercontent.com/rdpackages/rdrobust/master/stata) replace

ssc install ebalance, replace
ssc install center, replace
ssc install estout, replace
ssc install grstyle, replace
ssc install coefplot, replace
ssc install rddsga, replace
ssc install kountry, replace
ssc install iscogen, replace 
ssc install rangestat, replace
ssc install rangejoin, replace 
ssc install nearmrg, replace

ssc install palettes
ssc install colrspace
*/



clear all
set graphics off


Note: replicators should set up directories to open data and save tables and figures 
global root ""
cd "$root"

mkdir "$root\Appendix"
mkdir "$root\Appendix\Figures"
global figures "$root\Appendix\Figures"

mkdir "$root\Appendix\Tables"
global tables "$root\Appendix\Tables"




use "Elezioni_final_09_2025", clear


##############
## APPENDIX A
##############


##############
## APPENDIX B
##############

*** TABLE B.2

preserve

est clear

glo controls_delta "berlinguer_8479 craxi_8479 andreotti_8479 almirante_8479 turnout_8479"  

glo controls_pre "berlinguer_8379 berlinguer_7976 berlinguer_7672 berlinguer_7268" 

glo controls_other "sh_si_ref_1946 sh_si_ref_1985 population_1971 mascolinity_1971 age_index_1971 sh_educated_1971 employment_rate_1971 med_oro mortdis_tot"


* differences
eststo centrale: estpost summarize $controls_delta $controls_pre $controls_other if centrale == 1
eststo no_centrale: estpost summarize $controls_delta $controls_pre $controls_other if centrale == 0
eststo diff: estpost ttest  $controls_delta $controls_pre $controls_other , by(centrale)    
esttab centrale no_centrale diff ///
using "$tables/Table_B1", ///
mtitles("Mean (control)" "Mean (treatment)" "Diff." "Mean (control)" "Mean (treatment)" "Diff." ) ///
cells("mean(pattern(1 1 0) fmt(2))  b(pattern(0 0 1) fmt(2)) p(pattern(0 0 1) fmt(3))") ///
varl(berlinguer_8479 "PCI 1984e-1979e" craxi_8479 "PSI 1984e-1979e" andreotti_8479 "DC 1984e-1979e" almirante_8479 "MSI 1984e-1979e" turnout_8479 "Turnout 1984e-1979e" berlinguer_8379 "PCI 1983n-1979n" berlinguer_7976 "PCI 1979n-1976n" berlinguer_7672 "PCI 1976n-1972n" berlinguer_7268 "PCI 1972n-1968n" ///
sh_si_ref_1946 "Share Pro-Republic (1946)" sh_si_ref_1985 "Share Pro-Scala Mobile (1985)" /// 
population_1971 "Population" mascolinity_1971 "Masculinity Ratio" age_index_1971 "Age Index" sh_educated_1971 "Share Educated" employment_rate_1971 "Employment Rate" ///
med_oro "Golden Medal Municipality" mortdis_tot "Dead and Missing Persons WWII (1940-45)" ///
) ///
refcat(berlinguer_8479 "\textbf{{$\Delta$ Municipal Vote Share}}" berlinguer_street_11  "\textbf{{Berlinguer-related Data}}" sh_si_ref_1946 "\textbf{{Referenda}}" population_1971 "\textbf{{ISTAT Census (1971)}}" med_oro "\textbf{{WWII Exposure}}" , nolabel) ///
stats(N, label("Observations") fmt(0)) ///
replace tex
est clear	

restore



*** TABLE B.2 -> SEE DO FILE ITANES

*** TABLE B.3 -> SEE DO FILE ITANES







##############
## APPENDIX C
##############

***TABLE C.1

est clear

capture noisily eststo: reg berlinguer_8479 centrale , cluster(prov)
	estadd local sh_1976 "No"
	estadd local pretrends "No"

capture noisily eststo: reg berlinguer_8479 centrale sh_pci_p76  , cluster(prov) 
	estadd local sh_1976 "Yes"
	estadd local pretrends "No"

capture noisily eststo: reg berlinguer_8479 centrale sh_pci_p76 C.berlinguer_8379##C.berlinguer_8379##C.berlinguer_8379  , cluster(prov)
	estadd local sh_1976 "Yes"
	estadd local pretrends "Yes"

capture noisily esttab est* using "$tables\Table_C1", star(* .1 ** .05 *** .01) se b(3) r2 ///
	keep(centrale sh_pci_p76 berlinguer_8379 c.berlinguer_8379#c.berlinguer_8379 c.berlinguer_8379#c.berlinguer_8379#c.berlinguer_8379 _cons) ///
	order(centrale sh_pci_p76 berlinguer_8379 c.berlinguer_8379#c.berlinguer_8379 c.berlinguer_8379#c.berlinguer_8379#c.berlinguer_8379 _cons) ///
	varl(centrale "Centrale" ///
	berlinguer_8379 "$\Delta$ PCI 83n-79n" c.berlinguer_8379#c.berlinguer_8379 "$\Delta$ PCI 83n-79n$^2$" c.berlinguer_8379#c.berlinguer_8379#c.berlinguer_8379 "$\Delta$ PCI 83n-79n$^3$" sh_pci_p76 "Share PCI 1976n" ///
	_cons "Constant") ///
	s(N r2 N_clust , ///
	label("Observations" "R-squared" "N. Provinces") ///
	fmt(0 3 0)) /// 
	mtitles("$\Delta$ PCI 84e-79e" "$\Delta$ PCI 84e-79e" "$\Delta$ PCI 84e-79e" "$\Delta$ PCI 84e-79e" "$\Delta$ PCI 84e-79e" "$\Delta$ PCI 84e-79e" "$\Delta$ PCI 84e-79e" "$\Delta$ PCI 84e-79e" "$\Delta$ PCI 84e-79e" ) ///
	replace tex nonotes	


***TABLE C.2 

est clear 
local outcomes "berlinguer_8479 berlinguer_8379 berlinguer_7976 berlinguer_7672 berlinguer_7268"
foreach x of local outcomes {
 capture noisily eststo: reg `x' centrale , cluster(prov)
	estadd local controllo "No"
*	estadd local sh_1976 "Yes"
*	estadd local pretrends "Yes"
}

capture noisily esttab est* using "$tables\Table_C2.tex", star(* .1 ** .05 *** .01) se b(3) r2 ///
	keep(centrale _cons) ///
	order(centrale _cons) ///
	varl(centrale "Centrale" _cons "Constant") ///
	s(controllo N r2 N_clust , ///
	label("Trends" "Observations" "R-squared" "N. Provinces") /// 
	fmt(0 0 3 0)) ///
	mtitles("$\Delta$ PCI 84e-79e" "$\Delta$ PCI 83n-79n" "$\Delta$ PCI 79n-76n" "$\Delta$ PCI 76n-72n" "$\Delta$ PCI 72n-68n") ///
	replace tex nonotes	


***TABLE C.3 

est clear

preserve 
gen sh_party=sh_pci_p76
gen pretrend=berlinguer_8379
	
capture noisily eststo: reg berlinguer_8479 centrale sh_party C.pretrend##C.pretrend##C.pretrend , cluster(prov)
	estadd local sh_1976 "Yes"
	estadd local pretrends "Yes"
restore 

preserve 
gen sh_party=sh_psi_p76
gen pretrend=craxi_8379
	
capture noisily eststo: reg craxi_8479 centrale sh_party C.pretrend##C.pretrend##C.pretrend , cluster(prov)
	estadd local sh_1976 "Yes"
	estadd local pretrends "Yes"
restore 

preserve 
gen sh_party=sh_dc_p76
gen pretrend=andreotti_8379
	
capture noisily eststo: reg andreotti_8479 centrale sh_party C.pretrend##C.pretrend##C.pretrend , cluster(prov)
	estadd local sh_1976 "Yes"
	estadd local pretrends "Yes"
restore 

preserve 
gen sh_party=sh_msi_p76
gen pretrend=almirante_8379
	
capture noisily eststo: reg almirante_8479 centrale sh_party C.pretrend##C.pretrend##C.pretrend , cluster(prov)
	estadd local sh_1976 "Yes"
	estadd local pretrends "Yes"
restore 

preserve 
gen sh_party=turnout_p76
gen pretrend=turnout_8379
	
capture noisily eststo: reg turnout_8479 centrale sh_party C.pretrend##C.pretrend##C.pretrend , cluster(prov)
	estadd local sh_1976 "Yes"
	estadd local pretrends "Yes"
restore 

capture noisily esttab est* using "$tables\Table_C3", star(* .1 ** .05 *** .01) se b(3) r2 ///
	keep(centrale pretrend c.pretrend#c.pretrend c.pretrend#c.pretrend#c.pretrend sh_party _cons) ///
	order(centrale pretrend c.pretrend#c.pretrend c.pretrend#c.pretrend#c.pretrend sh_party _cons) ///
	varl(centrale "Centrale" ///
	pretrend "$\Delta$ Party Share 83n-79n" c.pretrend#c.pretrend "$\Delta$ Party Share 83n-79n$^2$" c.pretrend#c.pretrend#c.pretrend "$\Delta$ Party Share 83n-79n$^3$" sh_party "Party Share 1976n" ///
	_cons "Constant") ///
	s(N r2 N_clust , ///
	label("Observations" "R-squared" "N. Provinces") ///
	fmt(0 3 0)) /// 
	mtitles("$\Delta$ PCI 84e-79e" "$\Delta$ PSI 84e-79e" "$\Delta$ DC 84e-79e" "$\Delta$ MSI 84e-79e" "$\Delta$ Turnout 84e-79e") ///
	replace tex nonotes	

	
***TABLE C.4
	
glo controls "population_1971 mascolinity_1971 age_index_1971 sh_educated_1971 employment_rate_1971"
	
est clear
*1. naive 
capture noisily eststo: reg berlinguer_8479 centrale $controls , cluster(prov)
	*estadd local controllo "No"
	estadd local controls71 "Yes"
	estadd local sh_1976 "No"
	estadd local pretrends "No"
*3 add PCI share 1976
capture noisily eststo: reg berlinguer_8479 centrale sh_pci_p76 $controls  , cluster(prov) 
	estadd local controls71 "Yes"
	estadd local sh_1976 "Yes"
	estadd local pretrends "No"
*4 add cubic trend 79-83
capture noisily eststo: reg berlinguer_8479 centrale sh_pci_p76 C.berlinguer_8379##C.berlinguer_8379##C.berlinguer_8379 $controls , cluster(prov)
	estadd local controls71 "Yes"
	estadd local sh_1976 "Yes"
	estadd local pretrends "Yes"
	

capture noisily esttab est* using "$tables\Table_C4", star(* .1 ** .05 *** .01) se b(3) r2 ///
	keep() ///
	order(centrale sh_pci_p76 berlinguer_8379 c.berlinguer_8379#c.berlinguer_8379 c.berlinguer_8379#c.berlinguer_8379#c.berlinguer_8379) ///
	varl(centrale "Centrale" ///
	berlinguer_8379 "$\Delta$ PCI 83n-79n" c.berlinguer_8379#c.berlinguer_8379 "$\Delta$ PCI 83n-79n$^2$" c.berlinguer_8379#c.berlinguer_8379#c.berlinguer_8379 "$\Delta$ PCI 83n-79n$^3$" sh_pci_p76 "Share PCI 1976n" ///
	population_1971 "Population 1971" mascolinity_1971 "Mascolinity Ratio 1971" age_index_1971 "Age Index 1971" sh_educated_1971 "Share Educated 1971" employment_rate_1971 "Employment Rate 1971" ///
	_cons "Constant") ///
	s(controls71 N r2 N_clust , ///
	label("Controls 1971" "Observations" "R-squared" "N. Provinces") ///
	fmt(0 0 3 0)) /// 
	mtitles("$\Delta$ PCI 84e-79e" "$\Delta$ PCI 84e-79e" "$\Delta$ PCI 84e-79e") ///
	replace tex nonotes		

	
***Figure C.1

gen descrregione2=proper(descrregione)
replace descrregione2="Friuli-Venezia Giulia" if descrregione2=="Friuli Venezia Giulia" 
replace descrregione2="Trentino-Alto Adige" if descrregione2=="Trentino Alto Adige" 
replace descrregione2="Val d Aosta" if descrregione2=="Valle D Aosta" 
levelsof descrregione2 , clean

local countries `" "Abruzzo" "Basilicata" "Calabria" "Campania" "Emilia Romagna" "Friuli-Venezia Giulia" "Lazio" "Liguria" "Lombardia" "Marche" "Molise" "Piemonte" "Puglia" "Sardegna" "Sicilia" "Toscana" "Trentino-Alto Adige" "Umbria" "Val d Aosta" "Veneto" "'
	
est clear	
capture noisily: reg berlinguer_8479 centrale sh_pci_p76 C.berlinguer_8379##C.berlinguer_8379##C.berlinguer_8379 , cluster(prov)
est sto a0

local i=0
foreach x of local countries {

	display "`x'"
	local i=`i'+1
	display "`i'"

capture noisily: reg berlinguer_8479 centrale sh_pci_p76 C.berlinguer_8379##C.berlinguer_8379##C.berlinguer_8379 if descrregione2!="`x'" , cluster(prov)
est sto a`i'

}

*set graphics on
coefplot ///                
                (a0,  offset(0)   keep(centrale) rename(centrale= "Full Sample")	label(2 day) msymbol(circle)  mcolor(black) ciopts(lcolor(black black) recast(rcap))) ///
                (a1,  offset(0)   keep(centrale) rename(centrale= "Abruzzo")	label(2 day) msymbol(circle)  mcolor(black) ciopts(lcolor(black black) recast(rcap))) ///
                (a2,  offset(0)   keep(centrale) rename(centrale= "Basilicata")	label(2 day) msymbol(circle)  mcolor(black) ciopts(lcolor(black black) recast(rcap))) ///
                (a3,  offset(0)   keep(centrale) rename(centrale= "Calabria")	label(2 day) msymbol(circle)  mcolor(black) ciopts(lcolor(black black) recast(rcap))) ///
                (a4,  offset(0)   keep(centrale) rename(centrale= "Campania")	label(2 day) msymbol(circle)  mcolor(black) ciopts(lcolor(black black) recast(rcap))) ///
                (a5,  offset(0)   keep(centrale) rename(centrale= "Emilia Romagna")	label(2 day) msymbol(circle)  mcolor(black) ciopts(lcolor(black black) recast(rcap))) ///
                (a6,  offset(0)   keep(centrale) rename(centrale= "Friuli-Venezia Giulia")	label(2 day) msymbol(circle)  mcolor(black) ciopts(lcolor(black black) recast(rcap))) ///
                (a7,  offset(0)   keep(centrale) rename(centrale= "Lazio")	label(2 day) msymbol(circle)  mcolor(black) ciopts(lcolor(black black) recast(rcap))) ///
                (a8,  offset(0)   keep(centrale) rename(centrale= "Liguria")	label(2 day) msymbol(circle)  mcolor(black) ciopts(lcolor(black black) recast(rcap))) ///
                (a9,  offset(0)   keep(centrale) rename(centrale= "Lombardia")	label(2 day) msymbol(circle)  mcolor(black) ciopts(lcolor(black black) recast(rcap))) ///
                (a10,  offset(0)   keep(centrale) rename(centrale= "Marche")	label(2 day) msymbol(circle)  mcolor(black) ciopts(lcolor(black black) recast(rcap))) ///
                (a11,  offset(0)   keep(centrale) rename(centrale= "Molise")	label(2 day) msymbol(circle)  mcolor(black) ciopts(lcolor(black black) recast(rcap))) ///
                (a12,  offset(0)   keep(centrale) rename(centrale= "Piemonte")	label(2 day) msymbol(circle)  mcolor(black) ciopts(lcolor(black black) recast(rcap))) ///
                (a13,  offset(0)   keep(centrale) rename(centrale= "Puglia")	label(2 day) msymbol(circle)  mcolor(black) ciopts(lcolor(black black) recast(rcap))) ///
                (a14,  offset(0)   keep(centrale) rename(centrale= "Sardegna")	label(2 day) msymbol(circle)  mcolor(black) ciopts(lcolor(black black) recast(rcap))) ///
                (a15,  offset(0)   keep(centrale) rename(centrale= "Sicilia")	label(2 day) msymbol(circle)  mcolor(black) ciopts(lcolor(black black) recast(rcap))) ///
                (a16,  offset(0)   keep(centrale) rename(centrale= "Toscana")	label(2 day) msymbol(circle)  mcolor(black) ciopts(lcolor(black black) recast(rcap))) ///
                (a17,  offset(0)   keep(centrale) rename(centrale= "Trentino-Alto Adige")	label(2 day) msymbol(circle)  mcolor(black) ciopts(lcolor(black black) recast(rcap))) ///
                (a18,  offset(0)   keep(centrale) rename(centrale= "Umbria")	label(2 day) msymbol(circle)  mcolor(black) ciopts(lcolor(black black) recast(rcap))) ///
                (a19,  offset(0)   keep(centrale) rename(centrale= "Val d'Aosta")	label(2 day) msymbol(circle)  mcolor(black) ciopts(lcolor(black black) recast(rcap))) ///
                (a20,  offset(0)   keep(centrale) rename(centrale= "Veneto")	label(2 day) msymbol(circle)  mcolor(black) ciopts(lcolor(black black) recast(rcap))) ///
				, levels(95 90) xline(0, lcolor(orange) lpattern(dash)) subtitle("Change in PCI's Municipal Vote Share (1984e-1979e)",size(small)) xtitle("Coefficient Estimate", size(small)) ylabel(,labsize(small)) xlabel(-0.005 0 0.01 0.02,labsize(vsmall)) ///
				legend(order(3 "Centrale District") pos(6) row(1) size(small)) graphregion(col(white)) bgcol(white)
				
                graph export "$figures/Figure_C1.pdf", as(pdf) replace
                est clear	
	

***TABLE C.5

gen incumbency=1 if centrale==1 & (descrprovincia=="ROMA" | descrprovincia=="VITERBO" | descrprovincia=="LATINA" | descrprovincia=="FROSINONE")
replace incumbency=0 if centrale==1 & incumbency==.

gen temporary=1 if descrregione=="TOSCANA"
replace temporary=0 if descrregione=="LAZIO"

gen temporary2=1 if descrregione=="TOSCANA"
replace temporary2=0 if descrregione=="UMBRIA"

gen temporary3=1 if descrregione=="UMBRIA"
replace temporary3=0 if descrregione=="LAZIO"

gen temporary4=1 if descrregione=="UMBRIA"
replace temporary4=0 if descrregione=="MARCHE"

*INCUMBENCY
est clear
capture noisily eststo: reg berlinguer_8479 incumbency sh_pci_p76 C.berlinguer_8379##C.berlinguer_8379##C.berlinguer_8379  , cluster(prov)
	*estadd local controllo "Yes"
	estadd local sh_1976 "Yes"
	estadd local pretrends "Yes"

*TOSCANA-LAZIO
capture noisily eststo: reg berlinguer_8479 temporary sh_pci_p76 C.berlinguer_8379##C.berlinguer_8379##C.berlinguer_8379  , cluster(prov)
	*estadd local controllo "Yes"
	estadd local sh_1976 "Yes"
	estadd local pretrends "Yes"

*TOSCANA-UMBRIA
capture noisily eststo: reg berlinguer_8479 temporary2 sh_pci_p76 C.berlinguer_8379##C.berlinguer_8379##C.berlinguer_8379  , cluster(prov)
	*estadd local controllo "Yes"
	estadd local sh_1976 "Yes"
	estadd local pretrends "Yes"

*UMBRIA-LAZIO
capture noisily eststo: reg berlinguer_8479 temporary3 sh_pci_p76 C.berlinguer_8379##C.berlinguer_8379##C.berlinguer_8379  , cluster(prov)
	*estadd local controllo "Yes"
	estadd local sh_1976 "Yes"
	estadd local pretrends "Yes"

*UMBRIA-MARCHE
capture noisily eststo: reg berlinguer_8479 temporary4 sh_pci_p76 C.berlinguer_8379##C.berlinguer_8379##C.berlinguer_8379  , cluster(prov)
	*estadd local controllo "Yes"
	estadd local sh_1976 "Yes"
	estadd local pretrends "Yes"

capture noisily esttab est* using "$tables\Table_C5", star(* .1 ** .05 *** .01) se b(3) r2 ///
	keep(incumbency temporary temporary2 temporary3 temporary4 berlinguer_8379 c.berlinguer_8379#c.berlinguer_8379 c.berlinguer_8379#c.berlinguer_8379#c.berlinguer_8379 sh_pci_p76 _cons) ///
	order(incumbency temporary temporary2 temporary3 temporary4 berlinguer_8379 c.berlinguer_8379#c.berlinguer_8379 c.berlinguer_8379#c.berlinguer_8379#c.berlinguer_8379 sh_pci_p76 _cons) ///
	varl(incumbency "Berlinguer MP District" temporary "Toscana (Lazio)" temporary2 "Toscana (Umbria)" temporary3 "Umbria (Lazio)" temporary4 "Umbria (Marche)" ///
	berlinguer_8379 "$\Delta$ PCI 83e-79e" c.berlinguer_8379#c.berlinguer_8379 "$\Delta$ PCI 83e-79e$^2$" c.berlinguer_8379#c.berlinguer_8379#c.berlinguer_8379 "$\Delta$ PCI 83e-79e$^3$" sh_pci_p76 "Share PCI 1976n" _cons "Constant") ///
	s( N r2 N_clust , ///
	label( "Observations" "R-squared" "N. Provinces") ///
	fmt(0 3 0)) ///
	mtitles("$\Delta$ PCI 84e-79e" "$\Delta$ PCI 84e-79e" "$\Delta$ PCI 84e-79e" "$\Delta$ PCI 84e-79e" "$\Delta$ PCI 84e-79e") ///
	replace tex nonotes

drop temporary* incumbency


***Figure C.2

est clear	
reg berlinguer_8479 centrale sh_pci_p76 C.berlinguer_8379##C.berlinguer_8379##C.berlinguer_8379 if descrprovincia!="ROMA" & descrprovincia!="VITERBO" & descrprovincia!="LATINA" & descrprovincia!="FROSINONE" , cluster(prov)
est sto a1
loc n_a1=e(N)

reg craxi_8479 centrale sh_psi_p76 C.craxi_8379##C.craxi_8379##C.craxi_8379 if descrprovincia!="ROMA" & descrprovincia!="VITERBO" & descrprovincia!="LATINA" & descrprovincia!="FROSINONE" , cluster(prov)
est sto b1
loc n_b1=e(N)

reg andreotti_8479 centrale sh_dc_p76 C.andreotti_8379##C.andreotti_8379##C.andreotti_8379 if descrprovincia!="ROMA" & descrprovincia!="VITERBO" & descrprovincia!="LATINA" & descrprovincia!="FROSINONE" , cluster(prov)
est sto c1
loc n_c1=e(N)

reg almirante_8479 centrale sh_msi_p76 C.almirante_8379##C.almirante_8379##C.almirante_8379 if descrprovincia!="ROMA" & descrprovincia!="VITERBO" & descrprovincia!="LATINA" & descrprovincia!="FROSINONE" , cluster(prov)
est sto d1
loc n_d1=e(N)

reg turnout_8479 centrale turnout_p76 C.turnout_8379##C.turnout_8379##C.turnout_8379 if descrprovincia!="ROMA" & descrprovincia!="VITERBO" & descrprovincia!="LATINA" & descrprovincia!="FROSINONE" , cluster(prov)
est sto e1
loc n_e1=e(N)

*set graphics on
coefplot ///                
                (a1,  offset(0)   keep(centrale) rename(centrale = "PCI")                         label(2 day) msymbol(circle)  mcolor(black) ciopts(lcolor(black black))) ///
                (b1,  offset(0)   keep(centrale) rename(centrale = "PSI")                         label(2 day) msymbol(circle)  mcolor(black) ciopts(lcolor(black black))) ///
                (c1,  offset(0)   keep(centrale) rename(centrale = "DC")                         label(2 day) msymbol(circle)  mcolor(black) ciopts(lcolor(black black))) ///
                (d1,  offset(0)   keep(centrale) rename(centrale = "MSI")                         label(2 day) msymbol(circle)  mcolor(black) ciopts(lcolor(black black))) ///
                (e1,  offset(0)   keep(centrale) rename(centrale = "Turnout")                         label(2 day) msymbol(circle)  mcolor(black) ciopts(lcolor(black black))) ///
                , levels(95 90) xline(0, lpattern(dash) lcolor(orange)) xtitle("Coefficient Estimate", size(small)) subtitle("Change in Municipal Vote Share and Turnout (1984e-1979e)") xlabel(#3,labsize(small)) ///
				groups("PCI" = "N = `n_a1'" "PSI" = "N = `n_b1'"  "DC" = "N = `n_c1'" "MSI" = "N = `n_d1'" "Turnout" = "N = `n_e1'", labsize(vsmall)) ///
				grid(between glpattern(dash) glwidth(*2) glcolor(white) nogextend) ///
				plotregion(lc(black)) ///
				yscale(alt axis(2)) ///
				legend(order(3 "Centrale District") pos(6) row(1)) graphregion(col(white)) bgcol(white)

					
                graph export "$figures/Figure_C2.pdf", as(pdf) replace
                est clear	


***Table C.6 -> SEE DO FILE CANDIDATES


***Table C.7


est clear
*Medaglia
capture noisily eststo: reg berlinguer_8479 i.centrale##1.med_oro C.berlinguer_8379##C.berlinguer_8379##C.berlinguer_8379 sh_pci_p76 , cluster(prov)
	estadd local sh_1976 "Yes"
	estadd local pretrends "Yes"
preserve
collapse  berlinguer_8479 mortdis_tot berlinguer_8379 sh_pci_p76 , by(centrale prov)
*WWII
capture noisily eststo: reg berlinguer_8479 i.centrale##c.mortdis_tot C.berlinguer_8379##C.berlinguer_8379##C.berlinguer_8379 sh_pci_p76 , vce(robust)
	estadd local sh_1976 "Yes"
	estadd local pretrends "Yes"
restore 
*Referendum
capture noisily eststo: reg berlinguer_8479 i.centrale##c.sh_si_ref_1946 C.berlinguer_8379##C.berlinguer_8379##C.berlinguer_8379 sh_pci_p76 , cluster(prov)
	estadd local sh_1976 "Yes"
	estadd local pretrends "Yes"

capture noisily esttab est* using "$tables\Table_C7", star(* .1 ** .05 *** .01) se b(3) r2 ///
	keep(1.centrale 1.centrale#1.med_oro 1.centrale#c.mortdis_tot 1.centrale#c.sh_si_ref_1946 1.med_oro mortdis_tot sh_si_ref_1946 ///
	berlinguer_8379 c.berlinguer_8379#c.berlinguer_8379 c.berlinguer_8379#c.berlinguer_8379#c.berlinguer_8379 sh_pci_p76 _cons) ///
	order(1.centrale 1.centrale#1.med_oro 1.centrale#c.mortdis_tot 1.centrale#c.sh_si_ref_1946 1.med_oro mortdis_tot sh_si_ref_1946 berlinguer_8379 c.berlinguer_8379#c.berlinguer_8379 c.berlinguer_8379#c.berlinguer_8379#c.berlinguer_8379 sh_pci_p76 _cons) ///
	varl(1.centrale "Centrale" ///
	1.centrale#1.med_oro "Centrale $\times$ Golden Medal Resistance" 1.centrale#c.mortdis_tot "Centrale $\times$ Dead and Missing Persons WWII (1940-45)" 1.centrale#c.sh_si_ref_1946 "Centrale $\times$ Share Pro-Republic 1946" ///
	1.med_oro "Golden Medal Resistance" mortdis_tot "Dead and Missing Persons WWII (1940-45)" sh_si_ref_1946 "Share Pro-Republic 1946" ///
	berlinguer_8379 "$\Delta$ PCI 83e-79e" c.berlinguer_8379#c.berlinguer_8379 "$\Delta$ PCI 83e-79e$^2$" c.berlinguer_8379#c.berlinguer_8379#c.berlinguer_8379 "$\Delta$ PCI 83e-79e$^3$" sh_pci_p76 "Share PCI 1976n" ///
	_cons "Constant") ///
	s(N r2 N_clust , ///
	label("Observations" "R-squared" "N. Provinces") /// 
	fmt(0 3 0)) ///
	mtitles("$\Delta$ PCI 84e-79e" "$\Delta$ PCI 84e-79e" "$\Delta$ PCI 84e-79e") ///
	replace tex nonotes	





##############
## APPENDIX D
##############

gen first=berlinguer_8379 
gen second=berlinguer_8379*berlinguer_8379
gen third= berlinguer_8379*berlinguer_8379*berlinguer_8379 

***Table D.1 
est clear
global pcomp "berlinguer_8479"

matrix RDROBUST_matrix = J(6,8,0)
matrix rownames RDROBUST_matrix = "Distance from Northern Border" "SE" "N." "Mean" "Bandwidth (in Km)" "p-value"
matrix colnames RDROBUST_matrix = "(1)" "(2)" "(3)" "(4)" "(5)" "(6)" "(7)" "(8)"
local i=0
quietly foreach y of global pcomp{
		quietly foreach b of numlist 20 30 40 50 59 70 80 90 {	
				local i=`i'+1

			rdrobust `y' distanceNORTH_km if descrregione!="SICILIA" & descrregione!="SARDEGNA" , p(1) h(`b') c(0) covs(sh_pci_p76 first second third) kernel(uniform)

			matrix RDROBUST_matrix[1,`i'] = e(tau_bc)
			matrix RDROBUST_matrix[2,`i'] = e(se_tau_rb)
			matrix RDROBUST_matrix[3,`i'] = e(N_h_l) + e(N_h_r)
			sum `y' if r>=-floor(e(h_l)) & r<=floor(e(h_l))
			matrix RDROBUST_matrix[4,`i'] = `r(mean)'
			matrix RDROBUST_matrix[5,`i'] = floor(e(h_l))
			matrix RDROBUST_matrix[6,`i'] = e(pv_rb)
	}
	
}

estout matrix(RDROBUST_matrix, fmt("3 3 0 3 0 3")) using "$tables\Table_D1.tex", style(tex) replace starlevels(+ 0.1 * 0.05 ** 0.01 *** 0.001)
	
	
***Table D.2

gen log_population_1971=ln(population_1971+1) if population_1971!=. 

*NORTH
est clear

matrix ALL_BALANCE = J(6,5,0)
matrix rownames ALL_BALANCE = "Distance from Northern Border" "SE" "N." "Mean" "Bandwidth (in Km)" "p-value" 
matrix colnames ALL_BALANCE = "(1)" "(2)" "(3)" "(4)" "(5)"
local i=0


quietly foreach y of varlist log_population_1971 mascolinity_1971 age_index_1971 sh_educated_1971 employment_rate_1971 {

	quietly sum `y', det
	gen `y'_dem= `y' - `r(mean)'
	label var `y'_dem "Demeaned `y'"

	local i=`i'+1
	quietly rdrobust `y'_dem distanceNORTH_km  if descrregione!="SARDEGNA" & descrregione!="SICILIA" , c(0) p(1) covs(sh_pci_p76 first second third)
	matrix ALL_BALANCE[1,`i'] = e(tau_bc)
	matrix ALL_BALANCE[2,`i'] = e(se_tau_rb)
	matrix ALL_BALANCE[3,`i'] = e(N_h_l) + e(N_h_r)
	sum `y' if r>=-floor(e(h_l)) & r<=floor(e(h_l))
	matrix ALL_BALANCE[4,`i'] = `r(mean)'
	matrix ALL_BALANCE[5,`i'] = floor(e(h_l))
	matrix ALL_BALANCE[6,`i'] = e(pv_rb)
	drop `y'_dem
	}

estout matrix(ALL_BALANCE, fmt("3 3 0 3 0 3")) using "$tables\Table_D2a.tex", style(tex) replace


*SOUTH 
est clear

matrix ALL_BALANCE = J(6,5,0)
matrix rownames ALL_BALANCE = "Distance from Southern Border" "SE" "N." "Mean" "Bandwidth (in Km)" "p-value" 
matrix colnames ALL_BALANCE = "(1)" "(2)" "(3)" "(4)" "(5)"
local i=0

quietly foreach y of varlist log_population_1971 mascolinity_1971 age_index_1971 sh_educated_1971 employment_rate_1971 {

	quietly sum `y', det
	gen `y'_dem= `y' - `r(mean)'
	label var `y'_dem "Demeaned `y'"

	local i=`i'+1
	quietly rdrobust `y'_dem distanceSOUTH_km  if descrregione!="SARDEGNA" & descrregione!="SICILIA" , c(0) p(1) covs(sh_pci_p76 first second third)
	matrix ALL_BALANCE[1,`i'] = e(tau_bc)
	matrix ALL_BALANCE[2,`i'] = e(se_tau_rb)
	matrix ALL_BALANCE[3,`i'] = e(N_h_l) + e(N_h_r)
	sum `y' if r>=-floor(e(h_l)) & r<=floor(e(h_l))
	matrix ALL_BALANCE[4,`i'] = `r(mean)'
	matrix ALL_BALANCE[5,`i'] = floor(e(h_l))
	matrix ALL_BALANCE[6,`i'] = e(pv_rb)
	drop `y'_dem
	}

estout matrix(ALL_BALANCE, fmt("3 3 0 3 0 3")) using "$tables\Table_D2b.tex", style(tex) replace

	
***Figure D.1 

*Density of data either side of EACH BORDER
foreach x in distanceNORTH_km_running distanceSOUTH_km_running {
	di "******************** Border = `x' **********************"
	DCdensity `x'  if descrregione!="SARDEGNA" & descrregione!="SICILIA" , breakpoint(0) b(1) h(100) generate(Xj Yj r0 fhat se_fhat)
*	graph save Graph "$figures\g_`x'.gph", replace
	graph save Graph "$figures\Figure_D1_`x'.gph", replace
	graph export "$figures\Figure_D1_`x'.pdf", replace
	drop Xj Yj r0 fhat se_fhat
}
*net install lpdensity, from(https://raw.githubusercontent.com/nppackages/lpdensity/master/stata) replace
rddensity distanceNORTH_km_running , p(1)
local i=e(pv_q)
display `i'
rddensity distanceSOUTH_km_running , p(1)
local i=e(pv_q)
display `i'

foreach x in distanceNORTH_km_running distanceSOUTH_km_running {
sleep 10 
erase "$figures\Figure_D1_`x'.gph"
}


***Table D.3

*Alt. Polynomials
est clear
global pcomp "berlinguer_8479"

matrix RDROBUST_matrix = J(6,6,0)
matrix rownames RDROBUST_matrix = "Distance from Northern Border" "SE" "N." "Mean" "Bandwidth (in Km)" "p-value"
matrix colnames RDROBUST_matrix = "(1)" "(2)" "(3)" "(4)" "(5)" "(6)"
local i=0
quietly foreach y of global pcomp{
		quietly foreach poly of numlist 1/3 {	
				local i=`i'+1

			rdrobust `y' distanceNORTH_km if descrregione!="SICILIA" & descrregione!="SARDEGNA" , p(`poly') c(0) covs(sh_pci_p76 first second third)

			matrix RDROBUST_matrix[1,`i'] = e(tau_bc)
			matrix RDROBUST_matrix[2,`i'] = e(se_tau_rb)
			matrix RDROBUST_matrix[3,`i'] = e(N_h_l) + e(N_h_r)
			sum `y' if r>=-floor(e(h_l)) & r<=floor(e(h_l))
			matrix RDROBUST_matrix[4,`i'] = `r(mean)'
			matrix RDROBUST_matrix[5,`i'] = floor(e(h_l))
			matrix RDROBUST_matrix[6,`i'] = e(pv_rb)
	}
	
}

*Rectangular Kernel (uniform)
global pcomp "berlinguer_8479"

quietly foreach y of global pcomp{
		quietly foreach poly of numlist 1/3 {	
				local i=`i'+1

			rdrobust `y' distanceNORTH_km if descrregione!="SICILIA" & descrregione!="SARDEGNA" , p(`poly') c(0) covs(sh_pci_p76 first second third) kernel(uniform)

			matrix RDROBUST_matrix[1,`i'] = e(tau_bc)
			matrix RDROBUST_matrix[2,`i'] = e(se_tau_rb)
			matrix RDROBUST_matrix[3,`i'] = e(N_h_l) + e(N_h_r)
			sum `y' if r>=-floor(e(h_l)) & r<=floor(e(h_l))
			matrix RDROBUST_matrix[4,`i'] = `r(mean)'
			matrix RDROBUST_matrix[5,`i'] = floor(e(h_l))
			matrix RDROBUST_matrix[6,`i'] = e(pv_rb)
	}
	
}

estout matrix(RDROBUST_matrix, fmt("3 3 0 3 0 3")) using "$tables\Table_D3.tex", style(tex) replace starlevels(+ 0.1 * 0.05 ** 0.01 *** 0.001)


***Figure D.2

est clear
global pcomp "berlinguer_8479"

quietly foreach y of global pcomp {
	local i=0
	matrix A_`y' = J(20,7,0)
	
	foreach b of numlist -140(20)-20 {
		local i=`i'+1
		
		matrix A_`y'[`i',1] = `b'
		rdrobust `y' distanceNORTH_km if distanceNORTH_km<=-1 & descrregione!="SARDEGNA" & descrregione!="SICILIA" , p(1) c(`b') covs(sh_pci_p76 first second third)
		matrix A_`y'[`i',2] = e(tau_bc)
		matrix A_`y'[`i',3] = e(tau_bc) - 1.96 * e(se_tau_cl)
		matrix A_`y'[`i',4] = e(tau_bc) + 1.96 * e(se_tau_cl)
		matrix A_`y'[`i',5] = e(N_h_l) + e(N_h_r)
		matrix A_`y'[`i',6] = e(tau_bc) - 1.96 * e(se_tau_rb)
		matrix A_`y'[`i',7] = e(tau_bc) + 1.96 * e(se_tau_rb)
	}
}

quietly foreach y of global pcomp {
	
	foreach b of numlist 20(20)140 {
		local i=`i'+1
		
		matrix A_`y'[`i',1] = `b'
		rdrobust `y' distanceNORTH_km if distanceNORTH_km>=1 & descrregione!="SARDEGNA" & descrregione!="SICILIA" , p(1) c(`b') covs(sh_pci_p76 first second third)
		matrix A_`y'[`i',2] = e(tau_bc)
		matrix A_`y'[`i',3] = e(tau_bc) - 1.96 * e(se_tau_cl)
		matrix A_`y'[`i',4] = e(tau_bc) + 1.96 * e(se_tau_cl)
		matrix A_`y'[`i',5] = e(N_h_l) + e(N_h_r)
		matrix A_`y'[`i',6] = e(tau_bc) - 1.96 * e(se_tau_rb)
		matrix A_`y'[`i',7] = e(tau_bc) + 1.96 * e(se_tau_rb)
	}

	preserve
	svmat A_`y'
	twoway (scatter A_`y'2 A_`y'1 if A_`y'2!=0 , mcolor(black) msize(small) yscale(range(-0.03 0.03)) yline(0,lpattern(dash)) xline(0)) ///
		(rcap A_`y'6 A_`y'7 A_`y'1 if A_`y'2!=0 , vertical lcolor(gray) lwidth(thin)) ///
		(rcap A_`y'3 A_`y'4 A_`y'1 if A_`y'2!=0 , vertical lcolor(black) lwidth(thick)), ///
		legend(off) graphregion(fcolor(white) lcolor(white)) ylab(, nogrid)  ylabel(#5) xlabel(-140(20)140,labsize(small))  ///
		subtitle("Change in PCI's Municipal Vote Share (1984e-1979e)") ytitle("RD Estimate") xtitle("Placebo Border (Km away from real)") legend(off)

	graph save Graph "$figures/Figure_D2.gph", replace
	graph export "$figures/Figure_D2.pdf", replace
	sleep 50 
	restore
}
	sleep 10
	erase "$figures/Figure_D2.gph"


***Table D.4

est clear
global pcomp "sh_pci_p68 sh_pci_p72 sh_pci_p76 sh_pci_p79 sh_pci_e79 sh_pci_p83"

matrix RDROBUST_matrix = J(6,6,0)
matrix rownames RDROBUST_matrix = "Distance from Northern Border" "SE" "N." "Mean" "Bandwidth (in Km)" "p-value"
matrix colnames RDROBUST_matrix = "(1)" "(2)" "(3)" "(4)" "(5)" "(6)"
local i=0
quietly foreach y of global pcomp{
		quietly foreach poly of numlist 1 {	
				local i=`i'+1

			rdrobust `y' distanceNORTH_km if descrregione!="SICILIA" & descrregione!="SARDEGNA" , p(`poly') c(0) all

			matrix RDROBUST_matrix[1,`i'] = e(tau_bc)
			matrix RDROBUST_matrix[2,`i'] = e(se_tau_rb)
			matrix RDROBUST_matrix[3,`i'] = e(N_h_l) + e(N_h_r)
			sum `y' if r>=-floor(e(h_l)) & r<=floor(e(h_l))
			matrix RDROBUST_matrix[4,`i'] = `r(mean)'
			matrix RDROBUST_matrix[5,`i'] = floor(e(h_l))
			matrix RDROBUST_matrix[6,`i'] = e(pv_rb)
	}
	
}

estout matrix(RDROBUST_matrix, fmt("3 3 0 3 0 3")) using "$tables\Table_D4.tex", style(tex) replace starlevels(+ 0.1 * 0.05 ** 0.01 *** 0.001)


***Table D.5

preserve 
*Keep RD bandwidth
keep if abs(distanceNORTH_km_running)<=59

*First Stage
est clear
capture noisily eststo: reg berlinguer_8479 centrale , cluster(prov)
	estadd local sh_1976 "No"
	estadd local pretrends "No"
capture noisily eststo: reg berlinguer_8479 centrale sh_pci_p76  , cluster(prov) 
	estadd local sh_1976 "Yes"
	estadd local pretrends "No"
*4 add cubic trend 79-83
capture noisily eststo: reg berlinguer_8479 centrale sh_pci_p76 C.berlinguer_8379##C.berlinguer_8379##C.berlinguer_8379  , cluster(prov)
	estadd local sh_1976 "Yes"
	estadd local pretrends "Yes"

capture noisily esttab est* using "$tables\Table_D5a", star(* .1 ** .05 *** .01) se b(3) r2 ///
	keep(centrale sh_pci_p76 berlinguer_8379 c.berlinguer_8379#c.berlinguer_8379 c.berlinguer_8379#c.berlinguer_8379#c.berlinguer_8379 _cons) ///
	order(centrale sh_pci_p76 berlinguer_8379 c.berlinguer_8379#c.berlinguer_8379 c.berlinguer_8379#c.berlinguer_8379#c.berlinguer_8379_cons) ///
	varl(centrale "Centrale" ///
	berlinguer_8379 "$\Delta$ PCI 83n-79n" c.berlinguer_8379#c.berlinguer_8379 "$\Delta$ PCI 83n-79n$^2$" c.berlinguer_8379#c.berlinguer_8379#c.berlinguer_8379 "$\Delta$ PCI 83n-79n$^3$" sh_pci_p76 "Share PCI 1976n" ///
	_cons "Constant") ///
	s(sh_1976 pretrends N r2 N_clust , ///
	label("Share PCI 1976n" "Cubic Pre-Trends 83e-79e" "Observations" "R-squared" "N. Provinces") ///
	fmt(0 0 0 3 0)) /// 
	mtitles("$\Delta$ PCI 84e-79e" "$\Delta$ PCI 84e-79e" "$\Delta$ PCI 84e-79e") ///
	replace tex nonotes	

*Second Stage
est clear
local outcomes "sh_si_ref_1985 sh_pci_p87 sh_pci_e89"
foreach var of local outcomes  {

capture noisily eststo: ivregress 2sls `var' (berlinguer_8479 = centrale) sh_pci_p76 C.berlinguer_8379##C.berlinguer_8379##C.berlinguer_8379 , cluster(prov)  
	estadd local sh_1976 "Yes"
	estadd local pretrends "Yes"
	estat firststage
	mat fstat = r(singleresults)
	estadd scalar r2_new = fstat[1,1] , replace 
	estadd scalar fs = fstat[1,4] , replace
}
 
capture noisily esttab est* using "$tables\Table_D5b", star(* .1 ** .05 *** .01) se b(3) r2 ///
	keep(berlinguer_8479 sh_pci_p76 berlinguer_8379 c.berlinguer_8379#c.berlinguer_8379 c.berlinguer_8379#c.berlinguer_8379#c.berlinguer_8379 _cons) ///
	order(berlinguer_8479 sh_pci_p76 berlinguer_8379 c.berlinguer_8379#c.berlinguer_8379 c.berlinguer_8379#c.berlinguer_8379#c.berlinguer_8379 _cons) ///
	varl(berlinguer_8479 "$\Delta$ PCI 84e-79e" ///
	berlinguer_8379 "$\Delta$ PCI 83e-79e" c.berlinguer_8379#c.berlinguer_8379 "$\Delta$ PCI 83e-79e$^2$" c.berlinguer_8379#c.berlinguer_8379#c.berlinguer_8379 "$\Delta$ PCI 83e-79e$^3$" sh_pci_p76 "Share PCI 1976n" ///
	_cons "Constant") ///
	s(sh_1976 pretrends N r2_new fs N_clust , ///
	label("Share PCI 1976n" "Cubic Pre-Trends 83e-79e" "Observations" "R-squared" "F-Stat (1st Stage)" "N. Clusters") /// 
	fmt(0 0 0 3 3 0)) ///
	mtitles("1985 Referendum" "1987n" "1989e") ///
	replace tex nonotes	





##############
## APPENDIX E
##############

* -> SEE DO FILE ITANES